package com.ptc.ims.client;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.ptc.ims.shared.Product;

@RemoteServiceRelativePath("inventory")
public interface InventoryService 
extends RemoteService 
{
	/**
	 * 
	 * @return an empty list when no item is found
	 */
	List<Product> fetchProducts();
	
	/**
	 * 
	 * @param productId
	 * @return null when no product is found
	 */
	Product fetchProduct(String productId);
	
	/**
	 * 
	 * @param newValues
	 * @return false when Product was not modified.
	 */
	boolean modifyProduct(Product newValues);
	
	/**
	 * 
	 * @param newItem
	 * @return id of product added, null if error occurred
	 */
	String addProduct(Product newItem);
	
	/**
	 * 
	 * @param itemId
	 * @return list of id of products removed
	 */
	List<String> removeProduct(List<String> productIds);
}
